package chapter30.meituan;

public class Test {
    public static void main(String[] args) {
        //创建快递柜对象
        Box box = new Box();
        //创建生产者和消费者对象
        Producer p = new Producer(box,20);
        Customer c = new Customer(box);
        //创建两个线程
        Thread t1 = new Thread(p,"生产者线程");
        Thread t2 = new Thread(c,"消费者线程");
        //启动线程
        t1.start();
        t2.start();
    }
}
